package com.micromsg.common.service;

import com.micromsg.common.model.LoginUser;
import org.springframework.stereotype.Service;

@Service
public class ThreadLocalUserService {

    private ThreadLocal<LoginUser> loginUser = new ThreadLocal<LoginUser>();

    public void setUser(LoginUser user) {
        loginUser.set(user);
    }

    public LoginUser getUser() {
        return loginUser.get();
    }
}
